import http from "@/api/index.ts";
import { store } from "@/redux";
// 代办数据
/*
数据格式：
{ "code": "0", "data": { "rowCount": 1, "taskList": [
{ "bizDate": "24-02-29 15:37:11", "bizNo": "3E82850A393E484A9DFA8AF7B6DECF3B", "bizOrgId": "10009999", "bizParam": "", "bizProcUserId": "", "bizProcUserName": "", "bizSubmitUserId": "chuliren", "bizSubmitUserName": "处理人", "bizTitle": "c25e6aaa99e64bc48dd643e40a5a2932", "bizUserId": "faqiren", "bizUserName": "发起人名称", "flowId": "YDYSLC", "flowName": "月度预算流程", "instanceId": "36188074B653466BB38F6F2165A78460", "nodeId": "S_1", "nodeTagName": "编制", "opProcTime": "", "opTime": "2024-02-29 15:37:55", "opinion": "", "resumeTime": "", "status": "processing", "suspendTime": "",
"sysId": "HYYDKB", "taskId": "1709192275122", "taskStatus": "pending"
}
],"totalCount": 1, "totalPage": 1
},"message": "查询任务列表成功"
}
*/
// "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIzNDkwNTc0MDcyMDk1NDEiLCJyblN0ciI6IjRzcDVINGI4eXdtZXVzSm0xVHNFVG5PWVM2R1kyQklJIiwidXNlcl9pZCI6IjM0OTA1NzQwNzIwOTU0MSIsInVzZXJfbmFtZSI6ImFkbWluIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTcyMDM5NzI1NzIyOSwidG9rZW4iOiJsb2dpbl90b2tlbl81Nzk2ODE1NjU4MjM0Nzc3NjUifQ.amA435rbetoB4-LhHXKhe6xeRWnGWa502omtqZ2yuoI",

// 代理路由
const routers = "myWork";
export const dbTest = (param: any) => {
  // https://10.77.76.66/api/erp-flow/rest/workFlow/v1/loadFlowTask
  return http.post<any>(`/api/erp-flow/rest/workFlow/v1/loadFlowTask`, param, {
    headers: {
      Authorization: store.getState().user.token,
      baseUrlKey: routers,
      loading: true
    }
  });
};

export const GetTodoList = (param: any) => {
  // https://10.77.76.66/api/erp-flow/rest/workFlow/v1/loadFlowTask
  return http.post<any>(`/api/finportal/task/getList`, param, {
    headers: {
      Authorization: store.getState().user.token,

    },
    baseUrlKey: routers,
    loading: true
  });
};
// Authorization:
// "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIzNDkwNTc0MDcyMDk1NDEiLCJyblN0ciI6IlVnNWV4Skh4Njd0eVhUUVA3STdzOE16Mk96Q2M4clk4IiwidXNlcl9pZCI6IjM0OTA1NzQwNzIwOTU0MSIsInVzZXJfbmFtZSI6ImFkbWluIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTcyMDQxMjY3MjU3MCwidG9rZW4iOiJsb2dpbl90b2tlbl81Nzk3NDYyMjIzNjYwMDkzNDkifQ.wUJx1O_Ty8_kZtB_eJiYGsQnl2KSwi08rEWoRX2Uok0"

